#!/usr/bin/perl -w

my $count = 0;
my $size = -1;
my $reject = 0;
while(<>) {
    chomp;
    my (@value) = split /\,+/;
    my $nval = @value;
    if ( $size < $nval ) {
	$size = $nval;
    } elsif ( $size > $nval ) {
	++$reject;
	next;
    }
    # remove the first column
    # space separated output
    print $value[1];
    #for ( my $i=2; $i < 4; ++$i ) {
    for ( my $i=2; $i < $nval; ++$i ) {
	print " $value[$i]";
    }
    print "\n";
    ++$count;
}
print STDERR "$count lines processed, $reject rejected.\n";
exit(0);
